package math.geom3d;

import math.BSplineUtils;
import math.base.Point3d;
import math.base.Vector3d;
import math.geomUtils.CurveType;

/**
 * @author Saga
 *
 */
public class BezierCurve3d extends BoundedCurve3d {

    @Override
    public CurveType getCurveType() {
        return CurveType.BEZIER_CURVE;
    }

    @Override
    public void reverse() {

    }

    @Override
    public Curve3d reversed() {
        return null;
    }

    @Override
    public boolean isPeriodic() {
        return false;
    }

    @Override
    public double getPeriod() {
        return 0;
    }

    @Override
    public Point3d calcValue(final double _param) {
        if (this.rational) {
            return BSplineUtils.deCasteljau3d(this.ctrlPoles, _param);
        } else {
            return BSplineUtils.deCasteljauWithWeights3d(this.ctrlPoles, this.weights, _param);
        }
    }

    @Override
    public Vector3d calcDerivative(final double _param) {
        return null;
    }

    @Override
    public Vector3d calcDerivativeN(final double _param, final int _order) {
        return null;
    }

    @Override
    public void calcValueAndDerivative1(final double _param, final Point3d _pt,
            final Vector3d _der1) {

    }

    @Override
    public void calcValueAndDerivative2(final double _param, final Point3d _pt,
            final Vector3d _der1,
            final Vector3d _der2) {

    }

    @Override
    public void calcValueAndDerivative3(final double _param, final Point3d _pt,
            final Vector3d _der1, final Vector3d _der2,
            final Vector3d _der3) {

    }

    Point3d[] ctrlPoles;
    double[] weights;
    boolean rational;
}
